<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.*"%>
<%@include file="/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
	String path = request.getContextPath();%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/common/commoncss.jsp"></jsp:include>
<script type="text/javascript" src="js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/custom/opdombase.js"></script>
<script type="text/javascript" src="js/custom/zh_CN/main.js"></script>
<link type="text/css" href="js/calendar/css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/calendar/zh_CN/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/calendar/zh_CN/timepicker.js"></script>
<script type="text/javascript" src="js/custom/zh_CN/common.js"></script>
<script type="text/javascript" src="<%=path %>/js/custom/zh_CN_pager.js"></script>
<script type="text/javascript" src="<%=path %>/js/custom/zh_CN/form2json.js"></script>
<script language="javascript">
	/**页面加载的时候，初始化时间控件**/
	$(function(){
		dateval("publishTime",false);
		$("#publishTime").css("margin-bottom","-10px");
		$("td").attr("nowrap","nowrap");
	});
	function goAdd(){ 
		window.location.href = "DBManagePlatFormAction!DbInfoAdd";
	}
	function goDelete(id){
		if(confirm("确定要删除吗？")==true){
		window.location.href = "DBManagePlatFormAction!DbInfoDelete?id="+id;
		}
	}
	function goDbInfoEdit(id,ip,port,dbservername,dbslongname,username,password,type,datemonth,dbname,remark,oprtname,eff,exp){
		window.location.href = "DBManagePlatFormAction!DbInfoEdit?id="+id+"&ip="+ip+"&port="+port+"&dbservername="+dbservername+"&dbslongname="+dbslongname+"&username="+username+"&password="+password+"&type="+type+"&datemonth="+datemonth+"&dbname="+dbname+"&remark="+remark+"&oprtname="+oprtname+"&eff="+eff+"&exp="+exp;
	}
	function callBack_test(r){
		total = r.total;
		var searchFormRltTab$ = $('#testRltTab');
		var tbody$ = $('<tbody/>');
		var list = r.data;
		//var pageNum=r.pageNum+1;
		//显示数据
		$.each(list,function(index,dt){
			tbody$.append("<tr/>");
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_ip);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_port);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_dbservername);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_dbslongname);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_username);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_password);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_type);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_datemonth);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_dbname);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_remark);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_oprtname);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_eff);
			$('<td/>').appendTo(tbody$.find('tr:last')).html(dt.dbinfo_exp);
			$('<td/>').appendTo(tbody$.find('tr:last')).html("<a href='javascript:goDbInfoEdit("+dt.dbinfo_id+",\""+dt.dbinfo_ip+"\",\""+dt.dbinfo_port+"\",\""+dt.dbinfo_dbservername+"\",\""+dt.dbinfo_dbslongname+"\",\""+dt.dbinfo_username+"\",\""+dt.dbinfo_password+"\",\""+dt.dbinfo_type+"\",\""+dt.dbinfo_datemonth+"\",\""+dt.dbinfo_dbname+"\",\""+dt.dbinfo_remark+"\",\""+dt.dbinfo_oprtname+"\",\""+dt.dbinfo_eff+"\",\""+dt.dbinfo_exp+"\")'>修改</a>&nbsp;&nbsp;<a href='javascript:goDelete("+dt.dbinfo_id+")'>删除</a> ");
			if(index%2!=0)tbody$.find('tr:last').addClass("tdalt");
		});
		searchFormRltTab$.append(tbody$);
		//重新注册表格滑动交替行
		addTableClass();
	}
</script>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0"  bottommargin="0" style="border:0;background-color:#EFEFEF;">
		<div  style="width:98.3%;background-color:#FFFFFF;font-size:12px; color:#5f5f5f;vertical-align:middle;" >	
	<form name="Form1" id="test" action="DBManagePlatFormAction!getlist" method="post" >
	<input type="hidden" name="incSize" value='15'/>
	&nbsp;<a style="font-size: 15px;font-weight:bolb;" href="javascript:goAdd();">&nbsp;&nbsp;&nbsp;&nbsp;新增</a>
	</form>
	</div>
	<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th colspan="2" >数据库信息管理前台(列表)</th>
		</tr>
	</thead>
	</table>
	<div class="customscrollcount"></div>
				<div class="tbl_listtwo" style=" width:96%">
					<table  cellpadding="0" cellspacing="0" style="height:31px;table-layout:fixed;">
						<tr>
							<th nowrap="nowrap">IP</th>
							<th nowrap="nowrap">端口</th>
							<th nowrap="nowrap">数据库服务器名称</th>
							<th nowrap="nowrap">远程服务器名称</th>
							<th nowrap="nowrap">用户名</th>
							<th nowrap="nowrap">密码</th>
							<th nowrap="nowrap">数据库类型</th>
							<th nowrap="nowrap">月库月份</th>
							<th nowrap="nowrap">数据库名称</th>
							<th nowrap="nowrap">备注</th>
							<th nowrap="nowrap">操作人</th>
							<th nowrap="nowrap">生效日期</th>
							<th nowrap="nowrap">失效日期</th>
							<th nowrap="nowrap">操作</th>
						</tr>
					</table>
				</div>
				<div class="tbl_list lb tableRoll" style="overflow-y:scroll; height:480px;" id="testRltDiv">
					<table style="table-layout:fixed;"  id="loadDiv">
						<tr><td>正在努力加载数据</td></tr>
					</table>
					<table style="table-layout:fixed;" id='testRltTab'>
					</table>
					<jsp:include page="/common/pager.jsp"></jsp:include>
				</div>
<script type="text/javascript">
	addTableClass();
</script>
</body>
</html>